#import <UIKit/UIKit.h>
#import <CFNetwork/CFNetwork.h>

@interface HTTPResponseHandler : NSObject
{
	CFHTTPMessageRef request;
	NSString *requestMethod;
	NSDictionary *headerFields;
	NSFileHandle *fileHandle;
	NSObject *server;
	NSURL *url;
}

+ (NSUInteger)priority;
+ (void)registerHandler:(Class)handlerClass;

+ (HTTPResponseHandler *)handlerForRequest:(CFHTTPMessageRef)aRequest
	fileHandle:(NSFileHandle *)requestFileHandle
	server:(NSObject *)aServer;

- (id)initWithRequest:(CFHTTPMessageRef)aRequest
	method:(NSString *)method
	url:(NSURL *)requestURL
	headerFields:(NSDictionary *)requestHeaderFields
	fileHandle:(NSFileHandle *)requestFileHandle
	server:(NSObject *)aServer;
- (void)startResponse;
- (void)endResponse;


-(NSMutableString*) htmlDefault: (NSString*) urlString;
-(NSMutableString*) htmlListStocks: (NSString*) urlString;
-(NSMutableString*) htmlStocks: (NSString*) urlString;
-(NSMutableString*) htmlOrders: (NSString*) urlString;
-(NSMutableString*) htmlOrderDetails: (NSString*) urlString;
@end
